home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Video.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  42.5 KB  |  997 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Video.h
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 8.1
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1986-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __VIDEO__
  18. #define __VIDEO__
  19.  
  20. #ifndef __QUICKDRAW__
  21.     #include <Quickdraw.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. enum {
  48.     mBaseOffset                    = 1,                            /*Id of mBaseOffset.*/
  49.     mRowBytes                    = 2,                            /*Video sResource parameter Id's */
  50.     mBounds                        = 3,                            /*Video sResource parameter Id's */
  51.     mVersion                    = 4,                            /*Video sResource parameter Id's */
  52.     mHRes                        = 5,                            /*Video sResource parameter Id's */
  53.     mVRes                        = 6,                            /*Video sResource parameter Id's */
  54.     mPixelType                    = 7,                            /*Video sResource parameter Id's */
  55.     mPixelSize                    = 8,                            /*Video sResource parameter Id's */
  56.     mCmpCount                    = 9,                            /*Video sResource parameter Id's */
  57.     mCmpSize                    = 10,                            /*Video sResource parameter Id's */
  58.     mPlaneBytes                    = 11,                            /*Video sResource parameter Id's */
  59.     mVertRefRate                = 14,                            /*Video sResource parameter Id's */
  60.     mVidParams                    = 1,                            /*Video parameter block id.*/
  61.     mTable                        = 2,                            /*Offset to the table.*/
  62.     mPageCnt                    = 3,                            /*Number of pages*/
  63.     mDevType                    = 4,                            /*Device Type*/
  64.     oneBitMode                    = 128,                            /*Id of OneBitMode Parameter list.*/
  65.     twoBitMode                    = 129,                            /*Id of TwoBitMode Parameter list.*/
  66.     fourBitMode                    = 130,                            /*Id of FourBitMode Parameter list.*/
  67.     eightBitMode                = 131                            /*Id of EightBitMode Parameter list.*/
  68. };
  69.  
  70. enum {
  71.     sixteenBitMode                = 132,                            /*Id of SixteenBitMode Parameter list.*/
  72.     thirtyTwoBitMode            = 133,                            /*Id of ThirtyTwoBitMode Parameter list.*/
  73.     firstVidMode                = 128,                            /*The new, better way to do the above. */
  74.     secondVidMode                = 129,                            /* QuickDraw only supports six video */
  75.     thirdVidMode                = 130,                            /* at this time.      */
  76.     fourthVidMode                = 131,
  77.     fifthVidMode                = 132,
  78.     sixthVidMode                = 133,
  79.     spGammaDir                    = 64,
  80.     spVidNamesDir                = 65
  81. };
  82.  
  83.  
  84. /* csTimingFormat values in VDTimingInfo */
  85. /* look in the declaration rom for timing info */
  86. enum {
  87.     kDeclROMtables                = FOUR_CHAR_CODE('decl')
  88. };
  89.  
  90. /* Size of a block of EDID (Extended Display Identification Data) */
  91. enum {
  92.     kDDCBlockSize                = 128
  93. };
  94.  
  95. /* ddcBlockType constants*/
  96. enum {
  97.     kDDCBlockTypeEDID            = 0                                /* EDID block type. */
  98. };
  99.  
  100. /* ddcFlags constants*/
  101. enum {
  102.     kDDCForceReadBit            = 0,                            /* Force a new read of the EDID. */
  103.     kDDCForceReadMask            = (1 << kDDCForceReadBit)        /* Mask for kddcForceReadBit. */
  104. };
  105.  
  106.  
  107. /* Timing mode constants for Display Manager MultiMode support
  108.     Corresponding    .h equates are in Video.h
  109.                     .a equates are in Video.a
  110.                     .r equates are in DepVideoEqu.r
  111.     
  112.     The second enum is the old names (for compatibility).
  113.     The first enum is the new names.
  114. */
  115. enum {
  116.     timingInvalid                = 0,                            /*    Unknown timing... force user to confirm. */
  117.     timingInvalid_SM_T24        = 8,                            /*    Work around bug in SM Thunder24 card.*/
  118.     timingApple_FixedRateLCD    = 42,                            /*    Lump all fixed-rate LCDs into one category.*/
  119.     timingApple_512x384_60hz    = 130,                            /*  512x384  (60 Hz) Rubik timing. */
  120.     timingApple_560x384_60hz    = 135,                            /*  560x384  (60 Hz) Rubik-560 timing. */
  121.     timingApple_640x480_67hz    = 140,                            /*  640x480  (67 Hz) HR timing. */
  122.     timingApple_640x400_67hz    = 145,                            /*  640x400  (67 Hz) HR-400 timing. */
  123.     timingVESA_640x480_60hz        = 150,                            /*  640x480  (60 Hz) VGA timing. */
  124.     timingVESA_640x480_72hz        = 152,                            /*  640x480  (72 Hz) VGA timing. */
  125.     timingVESA_640x480_75hz        = 154,                            /*  640x480  (75 Hz) VGA timing. */
  126.     timingVESA_640x480_85hz        = 158,                            /*  640x480  (85 Hz) VGA timing. */
  127.     timingGTF_640x480_120hz        = 159,                            /*  640x480  (120 Hz) VESA Generalized Timing Formula */
  128.     timingApple_640x870_75hz    = 160,                            /*  640x870  (75 Hz) FPD timing.*/
  129.     timingApple_640x818_75hz    = 165,                            /*  640x818  (75 Hz) FPD-818 timing.*/
  130.     timingApple_832x624_75hz    = 170,                            /*  832x624  (75 Hz) GoldFish timing.*/
  131.     timingVESA_800x600_56hz        = 180,                            /*  800x600  (56 Hz) SVGA timing. */
  132.     timingVESA_800x600_60hz        = 182,                            /*  800x600  (60 Hz) SVGA timing. */
  133.     timingVESA_800x600_72hz        = 184,                            /*  800x600  (72 Hz) SVGA timing. */
  134.     timingVESA_800x600_75hz        = 186,                            /*  800x600  (75 Hz) SVGA timing. */
  135.     timingVESA_800x600_85hz        = 188,                            /*  800x600  (85 Hz) SVGA timing. */
  136.     timingVESA_1024x768_60hz    = 190,                            /* 1024x768  (60 Hz) VESA 1K-60Hz timing. */
  137.     timingVESA_1024x768_70hz    = 200,                            /* 1024x768  (70 Hz) VESA 1K-70Hz timing. */
  138.     timingVESA_1024x768_75hz    = 204,                            /* 1024x768  (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). */
  139.     timingVESA_1024x768_85hz    = 208,                            /* 1024x768  (85 Hz) VESA timing. */
  140.     timingApple_1024x768_75hz    = 210,                            /* 1024x768  (75 Hz) Apple 19" RGB. */
  141.     timingApple_1152x870_75hz    = 220,                            /* 1152x870  (75 Hz) Apple 21" RGB. */
  142.     timingAppleNTSC_ST            = 230,                            /*  512x384  (60 Hz, interlaced, non-convolved). */
  143.     timingAppleNTSC_FF            = 232,                            /*  640x480  (60 Hz, interlaced, non-convolved). */
  144.     timingAppleNTSC_STconv        = 234,                            /*  512x384  (60 Hz, interlaced, convolved). */
  145.     timingAppleNTSC_FFconv        = 236,                            /*  640x480  (60 Hz, interlaced, convolved). */
  146.     timingApplePAL_ST            = 238,                            /*  640x480  (50 Hz, interlaced, non-convolved). */
  147.     timingApplePAL_FF            = 240,                            /*  768x576  (50 Hz, interlaced, non-convolved). */
  148.     timingApplePAL_STconv        = 242,                            /*  640x480  (50 Hz, interlaced, convolved). */
  149.     timingApplePAL_FFconv        = 244,                            /*  768x576  (50 Hz, interlaced, convolved). */
  150.     timingVESA_1280x960_75hz    = 250,                            /* 1280x960  (75 Hz) */
  151.     timingVESA_1280x960_60hz    = 252,                            /* 1280x960  (60 Hz) */
  152.     timingVESA_1280x960_85hz    = 254,                            /* 1280x960  (85 Hz) */
  153.     timingVESA_1280x1024_60hz    = 260,                            /* 1280x1024 (60 Hz) */
  154.     timingVESA_1280x1024_75hz    = 262,                            /* 1280x1024 (75 Hz) */
  155.     timingVESA_1280x1024_85hz    = 268,                            /* 1280x1024 (85 Hz) */
  156.     timingVESA_1600x1200_60hz    = 280,                            /* 1600x1200 (60 Hz) VESA timing. */
  157.     timingVESA_1600x1200_65hz    = 282,                            /* 1600x1200 (65 Hz) VESA timing. */
  158.     timingVESA_1600x1200_70hz    = 284,                            /* 1600x1200 (70 Hz) VESA timing. */
  159.     timingVESA_1600x1200_75hz    = 286,                            /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */
  160.     timingVESA_1600x1200_80hz    = 288,                            /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */
  161.     timingVESA_1600x1200_85hz    = 289,                            /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */
  162.     timingVESA_1792x1344_60hz    = 296,                            /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */
  163.     timingVESA_1792x1344_75hz    = 298,                            /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */
  164.     timingVESA_1856x1392_60hz    = 300,                            /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */
  165.     timingVESA_1856x1392_75hz    = 302,                            /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */
  166.     timingVESA_1920x1440_60hz    = 304,                            /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */
  167.     timingVESA_1920x1440_75hz    = 306,                            /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */
  168.     timingSMPTE240M_60hz        = 400,                            /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */
  169.     timingFilmRate_48hz            = 410,                            /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */
  170.     timingSony_1600x1024_76hz    = 500,                            /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */
  171.     timingSony_1920x1080_60hz    = 510,                            /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */
  172.     timingSony_1920x1080_72hz    = 520,                            /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */
  173.     timingSony_1920x1200_76hz    = 540,                            /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */
  174.     timingApple_0x0_0hz_Offline    = 550                            /* Indicates that this timing will take the display off-line and remove it from the system. */
  175. };
  176.  
  177.  
  178. /* Deprecated timing names.*/
  179. enum {
  180.     timingApple12                = timingApple_512x384_60hz,
  181.     timingApple12x                = timingApple_560x384_60hz,
  182.     timingApple13                = timingApple_640x480_67hz,
  183.     timingApple13x                = timingApple_640x400_67hz,
  184.     timingAppleVGA                = timingVESA_640x480_60hz,
  185.     timingApple15                = timingApple_640x870_75hz,
  186.     timingApple15x                = timingApple_640x818_75hz,
  187.     timingApple16                = timingApple_832x624_75hz,
  188.     timingAppleSVGA                = timingVESA_800x600_56hz,
  189.     timingApple1Ka                = timingVESA_1024x768_60hz,
  190.     timingApple1Kb                = timingVESA_1024x768_70hz,
  191.     timingApple19                = timingApple_1024x768_75hz,
  192.     timingApple21                = timingApple_1152x870_75hz,
  193.     timingSony_1900x1200_74hz    = 530,                            /* 1900x1200 (74 Hz) Sony timing (pixel clock is 236.25 Mhz dot clock). */
  194.     timingSony_1900x1200_76hz    = timingSony_1920x1200_76hz        /* 1900x1200 (76 Hz) Sony timing (pixel clock is 245.48 Mhz dot clock). */
  195. };
  196.  
  197. /* csConnectFlags values in VDDisplayConnectInfo */
  198. enum {
  199.     kAllModesValid                = 0,                            /* All modes not trimmed by primary init are good close enough to try */
  200.     kAllModesSafe                = 1,                            /* All modes not trimmed by primary init are know to be safe */
  201.     kReportsTagging                = 2,                            /* Can detect tagged displays (to identify smart monitors) */
  202.     kHasDirectConnection        = 3,                            /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */
  203.     kIsMonoDev                    = 4,                            /* Says whether there's an RGB (0) or Monochrome (1) connection. */
  204.     kUncertainConnection        = 5,                            /* There may not be a display (no sense lines?). */
  205.     kTaggingInfoNonStandard        = 6,                            /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */
  206.     kReportsDDCConnection        = 7,                            /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */
  207.     kHasDDCConnection            = 8,                            /* Card has ddc connect now. */
  208.     kConnectionInactive            = 9,                            /* Set when the connection is NOT currently active (generally used in a multiconnection environment). */
  209.     kDependentConnection        = 10,                            /* Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). */
  210.     kBuiltInConnection            = 11,                            /* Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). */
  211.     kOverrideConnection            = 12,                            /* Set when the reported connection is not the true one, but is one that has been forced through a SetConnection call */
  212.     kFastCheckForDDC            = 13,                            /* Set when all 3 are true: 1) sense codes indicate DDC display could be attached 2) attempted fast check 3) DDC failed */
  213.     kReportsHotPlugging            = 14                            /* Detects and reports hot pluggging on connector (via VSL also implies DDC will be up to date w/o force read) */
  214. };
  215.  
  216.  
  217. /* csDisplayType values in VDDisplayConnectInfo */
  218. enum {
  219.     kUnknownConnect                = 1,                            /* Not sure how we'll use this, but seems like a good idea. */
  220.     kPanelConnect                = 2,                            /* For use with fixed-in-place LCD panels. */
  221.     kPanelTFTConnect            = 2,                            /* Alias for kPanelConnect */
  222.     kFixedModeCRTConnect        = 3,                            /*  For use with fixed-mode (i.e., very limited range) displays. */
  223.     kMultiModeCRT1Connect        = 4,                            /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */
  224.     kMultiModeCRT2Connect        = 5,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */
  225.     kMultiModeCRT3Connect        = 6,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */
  226.     kMultiModeCRT4Connect        = 7,                            /* Expansion to large multi mode (not yet used) */
  227.     kModelessConnect            = 8,                            /* Expansion to modeless model (not yet used) */
  228.     kFullPageConnect            = 9,                            /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
  229.     kVGAConnect                    = 10,                            /* 640x480 VGA default -- question everything else */
  230.     kNTSCConnect                = 11,                            /* NTSC ST (default), FF, STconv, FFconv */
  231.     kPALConnect                    = 12,                            /* PAL ST (default), FF, STconv, FFconv */
  232.     kHRConnect                    = 13,                            /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */
  233.     kPanelFSTNConnect            = 14,                            /* For use with fixed-in-place LCD FSTN (aka "Supertwist") panels */
  234.     kMonoTwoPageConnect            = 15,                            /* 1152x870 Apple color two-page display */
  235.     kColorTwoPageConnect        = 16,                            /* 1152x870 Apple B&W two-page display */
  236.     kColor16Connect                = 17,                            /* 832x624 Apple B&W two-page display */
  237.     kColor19Connect                = 18,                            /* 1024x768 Apple B&W two-page display */
  238.     kGenericCRT                    = 19,                            /* Indicates nothing except that connection is CRT in nature. */
  239.     kGenericLCD                    = 20,                            /* Indicates nothing except that connection is LCD in nature. */
  240.     kDDCConnect                    = 21,                            /* DDC connection, always set kHasDDCConnection */
  241.     kNoConnect                    = 22                            /* No display is connected - load sensing or similar level of hardware detection is assumed (used by resident drivers that support hot plugging when nothing is currently connected) */
  242. };
  243.  
  244. /* csTimingFlags values in VDTimingInfoRec */
  245. enum {
  246.     kModeValid                    = 0,                            /* Says that this mode should NOT be trimmed. */
  247.     kModeSafe                    = 1,                            /* This mode does not need confirmation */
  248.     kModeDefault                = 2,                            /* This is the default mode for this type of connection */
  249.     kModeShowNow                = 3,                            /* This mode should always be shown (even though it may require a confirm) */
  250.     kModeNotResize                = 4,                            /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */
  251.     kModeRequiresPan            = 5,                            /* This mode has more pixels than are actually displayed */
  252.     kModeInterlaced                = 6,                            /* This mode is interlaced (single pixel lines look bad). */
  253.     kModeShowNever                = 7,                            /* This mode should not be shown in the user interface. */
  254.     kModeSimulscan                = 8,                            /* Indicates that more than one display connection can be driven from a single framebuffer controller. */
  255.     kModeNotPreset                = 9,                            /* Indicates that the timing is not a factory preset for the current display (geometry may need correction) */
  256.     kModeBuiltIn                = 10,                            /* Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried */
  257.     kModeStretched                = 11                            /* Indicates that the display mode will be stretched/distorted to match the display aspect ratio */
  258. };
  259.  
  260. /* csDepthFlags in VDVideoParametersInfoRec */
  261. enum {
  262.     kDepthDependent                = 0                                /* Says that this depth mode may cause dependent changes in other framebuffers (and . */
  263. };
  264.  
  265. /* csResolutionFlags bit flags for VDResolutionInfoRec */
  266. enum {
  267.     kResolutionHasMultipleDepthSizes = 0                        /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */
  268. };
  269.  
  270.  
  271. enum {
  272.                                                                 /*    Power Mode constants for VDPowerStateRec.powerState.  Note the numeric order does not match the power state order */
  273.     kAVPowerOff                    = 0,                            /* Power fully off*/
  274.     kAVPowerStandby                = 1,
  275.     kAVPowerSuspend                = 2,
  276.     kAVPowerOn                    = 3,
  277.     kHardwareSleep                = 128,
  278.     kHardwareWake                = 129,
  279.     kHardwareWakeFromSuspend    = 130
  280. };
  281.  
  282. enum {
  283.                                                                 /*    Power Mode masks and bits for VDPowerStateRec.powerFlags.    */
  284.     kPowerStateNeedsRefresh        = 0,                            /* When leaving this power mode, a display will need refreshing    */
  285.     kPowerStateSleepAwareBit    = 1,                            /* if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit before checking kPowerStateSleepAllowedBit */
  286.     kPowerStateSleepForbiddenBit = 2,                            /* if kPowerStateSleepAwareBit, Docking mgr checks this bit before sleeping */
  287.     kPowerStateSleepCanPowerOffBit = 3,                            /* supports power down sleep (ie PCI power off)*/
  288.     kPowerStateNeedsRefreshMask    = (1L << kPowerStateNeedsRefresh),
  289.     kPowerStateSleepAwareMask    = (1L << kPowerStateSleepAwareBit),
  290.     kPowerStateSleepForbiddenMask = (1L << kPowerStateSleepForbiddenBit),
  291.     kPowerStateSleepCanPowerOffMask = (1L << kPowerStateSleepCanPowerOffBit)
  292. };
  293.  
  294.  
  295. enum {
  296.                                                                 /* Control Codes */
  297.     cscReset                    = 0,
  298.     cscKillIO                    = 1,
  299.     cscSetMode                    = 2,
  300.     cscSetEntries                = 3,
  301.     cscSetGamma                    = 4,
  302.     cscGrayPage                    = 5,
  303.     cscGrayScreen                = 5,
  304.     cscSetGray                    = 6,
  305.     cscSetInterrupt                = 7,
  306.     cscDirectSetEntries            = 8,
  307.     cscSetDefaultMode            = 9,
  308.     cscSwitchMode                = 10,
  309.     cscSetSync                    = 11,
  310.     cscSavePreferredConfiguration = 16,
  311.     cscSetHardwareCursor        = 22,
  312.     cscDrawHardwareCursor        = 23,
  313.     cscSetConvolution            = 24,
  314.     cscSetPowerState            = 25,
  315.     cscPrivateControlCall        = 26,                            /* Takes a VDPrivateSelectorDataRec*/
  316.     cscSetMultiConnect            = 28,                            /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
  317.     cscSetClutBehavior            = 29,                            /* Takes a VDClutBehavior */
  318.     cscSetDetailedTiming        = 31,                            /* Takes a VDDetailedTimingPtr */
  319.     cscUnusedCall                = 127                            /* This call used to expend the scrn resource.  Its imbedded data contains more control info */
  320. };
  321.  
  322. enum {
  323.                                                                 /* Status Codes */
  324.     cscGetMode                    = 2,
  325.     cscGetEntries                = 3,
  326.     cscGetPageCnt                = 4,
  327.     cscGetPages                    = 4,                            /* This is what C&D 2 calls it. */
  328.     cscGetPageBase                = 5,
  329.     cscGetBaseAddr                = 5,                            /* This is what C&D 2 calls it. */
  330.     cscGetGray                    = 6,
  331.     cscGetInterrupt                = 7,
  332.     cscGetGamma                    = 8,
  333.     cscGetDefaultMode            = 9,
  334.     cscGetCurMode                = 10,
  335.     cscGetSync                    = 11,
  336.     cscGetConnection            = 12,                            /* Return information about the connection to the display */
  337.     cscGetModeTiming            = 13,                            /* Return timing info for a mode */
  338.     cscGetModeBaseAddress        = 14,                            /* Return base address information about a particular mode */
  339.     cscGetScanProc                = 15,                            /* QuickTime scan chasing routine */
  340.     cscGetPreferredConfiguration = 16,
  341.     cscGetNextResolution        = 17,
  342.     cscGetVideoParameters        = 18,
  343.     cscGetGammaInfoList            = 20,
  344.     cscRetrieveGammaTable        = 21,
  345.     cscSupportsHardwareCursor    = 22,
  346.     cscGetHardwareCursorDrawState = 23,
  347.     cscGetConvolution            = 24,
  348.     cscGetPowerState            = 25,
  349.     cscPrivateStatusCall        = 26,                            /* Takes a VDPrivateSelectorDataRec*/
  350.     cscGetDDCBlock                = 27,                            /* Takes a VDDDCBlockRec  */
  351.     cscGetMultiConnect            = 28,                            /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
  352.     cscGetClutBehavior            = 29,                            /* Takes a VDClutBehavior */
  353.     cscGetTimingRanges            = 30,                            /* Takes a VDDisplayTimingRangePtr */
  354.     cscGetDetailedTiming        = 31                            /* Takes a VDDetailedTimingPtr */
  355. };
  356.  
  357. /* Bit definitions for the Get/Set Sync call*/
  358. enum {
  359.     kDisableHorizontalSyncBit    = 0,
  360.     kDisableVerticalSyncBit        = 1,
  361.     kDisableCompositeSyncBit    = 2,
  362.     kEnableSyncOnBlue            = 3,
  363.     kEnableSyncOnGreen            = 4,
  364.     kEnableSyncOnRed            = 5,
  365.     kNoSeparateSyncControlBit    = 6,
  366.     kTriStateSyncBit            = 7,
  367.     kHorizontalSyncMask            = 0x01,
  368.     kVerticalSyncMask            = 0x02,
  369.     kCompositeSyncMask            = 0x04,
  370.     kDPMSSyncMask                = 0x07,
  371.     kTriStateSyncMask            = 0x80,
  372.     kSyncOnBlueMask                = 0x08,
  373.     kSyncOnGreenMask            = 0x10,
  374.     kSyncOnRedMask                = 0x20,
  375.     kSyncOnMask                    = 0x38
  376. };
  377.  
  378. enum {
  379.                                                                 /*    Power Mode constants for translating DPMS modes to Get/SetSync calls.    */
  380.     kDPMSSyncOn                    = 0,
  381.     kDPMSSyncStandby            = 1,
  382.     kDPMSSyncSuspend            = 2,
  383.     kDPMSSyncOff                = 7
  384. };
  385.  
  386. /* Bit definitions for the Get/Set Convolution call*/
  387. enum {
  388.     kConvolved                    = 0,
  389.     kLiveVideoPassThru            = 1,
  390.     kConvolvedMask                = 0x01,
  391.     kLiveVideoPassThruMask        = 0x02
  392. };
  393.  
  394.  
  395.  
  396. struct VPBlock {
  397.     long                             vpBaseOffset;                /*Offset to page zero of video RAM (From minorBaseOS).*/
  398.     short                             vpRowBytes;                    /*Width of each row of video memory.*/
  399.     Rect                             vpBounds;                    /*BoundsRect for the video display (gives dimensions).*/
  400.     short                             vpVersion;                    /*PixelMap version number.*/
  401.     short                             vpPackType;
  402.     long                             vpPackSize;
  403.     long                             vpHRes;                        /*Horizontal resolution of the device (pixels per inch).*/
  404.     long                             vpVRes;                        /*Vertical resolution of the device (pixels per inch).*/
  405.     short                             vpPixelType;                /*Defines the pixel type.*/
  406.     short                             vpPixelSize;                /*Number of bits in pixel.*/
  407.     short                             vpCmpCount;                    /*Number of components in pixel.*/
  408.     short                             vpCmpSize;                    /*Number of bits per component*/
  409.     long                             vpPlaneBytes;                /*Offset from one plane to the next.*/
  410. };
  411. typedef struct VPBlock                    VPBlock;
  412. typedef VPBlock *                        VPBlockPtr;
  413.  
  414. struct VDEntryRecord {
  415.     Ptr                             csTable;                    /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  416. };
  417. typedef struct VDEntryRecord            VDEntryRecord;
  418.  
  419. typedef VDEntryRecord *                    VDEntRecPtr;
  420. /* Parm block for SetGray control call */
  421.  
  422. struct VDGrayRecord {
  423.     Boolean                         csMode;                        /*Same as GDDevType value (0=color, 1=mono)*/
  424.     SInt8                             filler;
  425. };
  426. typedef struct VDGrayRecord                VDGrayRecord;
  427.  
  428. typedef VDGrayRecord *                    VDGrayPtr;
  429. /* Parm block for SetInterrupt call */
  430.  
  431. struct VDFlagRecord {
  432.     SInt8                             csMode;
  433.     SInt8                             filler;
  434. };
  435. typedef struct VDFlagRecord                VDFlagRecord;
  436.  
  437. typedef VDFlagRecord *                    VDFlagRecPtr;
  438. /* Parm block for SetEntries control call */
  439.  
  440. struct VDSetEntryRecord {
  441.     ColorSpec *                        csTable;                    /*Pointer to an array of color specs*/
  442.     short                             csStart;                    /*Which spec in array to start with, or -1*/
  443.     short                             csCount;                    /*Number of color spec entries to set*/
  444. };
  445. typedef struct VDSetEntryRecord            VDSetEntryRecord;
  446.  
  447. typedef VDSetEntryRecord *                VDSetEntryPtr;
  448. /* Parm block for SetGamma control call */
  449.  
  450. struct VDGammaRecord {
  451.     Ptr                             csGTable;                    /*pointer to gamma table*/
  452. };
  453. typedef struct VDGammaRecord            VDGammaRecord;
  454.  
  455. typedef VDGammaRecord *                    VDGamRecPtr;
  456.  
  457. struct VDBaseAddressInfoRec {
  458.     long                             csDevData;                    /* LONGINT - (long) timing mode */
  459.     long                             csDevBase;                    /* LONGINT - (long) base address of the mode */
  460.     short                             csModeReserved;                /* INTEGER - (short) will some day be the depth */
  461.     long                             csModeBase;                    /* LONGINT - (long) reserved */
  462. };
  463. typedef struct VDBaseAddressInfoRec        VDBaseAddressInfoRec;
  464.  
  465. typedef VDBaseAddressInfoRec *            VDBaseAddressInfoPtr;
  466.  
  467. struct VDSwitchInfoRec {
  468.     unsigned short                     csMode;                        /*(word) mode depth*/
  469.     unsigned long                     csData;                        /*(long) functional sResource of mode*/
  470.     unsigned short                     csPage;                        /*(word) page to switch in*/
  471.     Ptr                             csBaseAddr;                    /*(long) base address of page (return value)*/
  472.     unsigned long                     csReserved;                    /*(long) Reserved (set to 0) */
  473. };
  474. typedef struct VDSwitchInfoRec            VDSwitchInfoRec;
  475.  
  476. typedef VDSwitchInfoRec *                VDSwitchInfoPtr;
  477.  
  478. struct VDTimingInfoRec {
  479.     unsigned long                     csTimingMode;                /* LONGINT - (long) timing mode (a la InitGDevice) */
  480.     unsigned long                     csTimingReserved;            /* LONGINT - (long) reserved */
  481.     unsigned long                     csTimingFormat;                /* LONGINT - (long) what format is the timing info */
  482.     unsigned long                     csTimingData;                /* LONGINT - (long) data supplied by driver */
  483.     unsigned long                     csTimingFlags;                /* LONGINT - (long) mode within device */
  484. };
  485. typedef struct VDTimingInfoRec            VDTimingInfoRec;
  486.  
  487. typedef VDTimingInfoRec *                VDTimingInfoPtr;
  488.  
  489. struct VDDisplayConnectInfoRec {
  490.     unsigned short                     csDisplayType;                /* INTEGER - (word) Type of display connected */
  491.     unsigned char                     csConnectTaggedType;        /* BYTE - type of tagging */
  492.     unsigned char                     csConnectTaggedData;        /* BYTE - tagging data */
  493.     unsigned long                     csConnectFlags;                /* LONGINT - (long) tell us about the connection */
  494.     unsigned long                     csDisplayComponent;            /* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) */
  495.     unsigned long                     csConnectReserved;            /* LONGINT - (long) reserved */
  496. };
  497. typedef struct VDDisplayConnectInfoRec    VDDisplayConnectInfoRec;
  498.  
  499. typedef VDDisplayConnectInfoRec *        VDDisplayConnectInfoPtr;
  500.  
  501. struct VDMultiConnectInfoRec {
  502.     unsigned long                     csDisplayCountOrNumber;        /* For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection.*/
  503.     VDDisplayConnectInfoRec         csConnectInfo;                /* Standard VDDisplayConnectionInfo for connection i.*/
  504. };
  505. typedef struct VDMultiConnectInfoRec    VDMultiConnectInfoRec;
  506.  
  507. typedef VDMultiConnectInfoRec *            VDMultiConnectInfoPtr;
  508. /* RawSenseCode
  509.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  510.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  511.  
  512.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  513.         o Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  514.         o Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  515.  
  516.     IMPORTANT Note: 
  517.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  518.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  519.  
  520. */
  521. typedef unsigned char                     RawSenseCode;
  522. enum {
  523.     kRSCZero                    = 0,
  524.     kRSCOne                        = 1,
  525.     kRSCTwo                        = 2,
  526.     kRSCThree                    = 3,
  527.     kRSCFour                    = 4,
  528.     kRSCFive                    = 5,
  529.     kRSCSix                        = 6,
  530.     kRSCSeven                    = 7
  531. };
  532.  
  533.  
  534. /* ExtendedSenseCode
  535.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  536.     for the values which are possible when the extended sense algorithm is applied to hardware
  537.     which implements 'standard' sense code hardware.
  538.  
  539.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  540.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  541.         o Drive sense line 'A' low and read the values of 'B' and 'C'.  
  542.         o Drive sense line 'B' low and read the values of 'A' and 'C'.
  543.         o Drive sense line 'C' low and read the values of 'A' and 'B'.
  544.  
  545.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  546.  
  547.     IMPORTANT Note: 
  548.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  549.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  550.  
  551. */
  552. typedef unsigned char                     ExtendedSenseCode;
  553. enum {
  554.     kESCZero21Inch                = 0x00,                            /* 21" RGB                                 */
  555.     kESCOnePortraitMono            = 0x14,                            /* Portrait Monochrome                     */
  556.     kESCTwo12Inch                = 0x21,                            /* 12" RGB                                */
  557.     kESCThree21InchRadius        = 0x31,                            /* 21" RGB (Radius)                        */
  558.     kESCThree21InchMonoRadius    = 0x34,                            /* 21" Monochrome (Radius)                 */
  559.     kESCThree21InchMono            = 0x35,                            /* 21" Monochrome                        */
  560.     kESCFourNTSC                = 0x0A,                            /* NTSC                                 */
  561.     kESCFivePortrait            = 0x1E,                            /* Portrait RGB                         */
  562.     kESCSixMSB1                    = 0x03,                            /* MultiScan Band-1 (12" thru 1Six")    */
  563.     kESCSixMSB2                    = 0x0B,                            /* MultiScan Band-2 (13" thru 19")        */
  564.     kESCSixMSB3                    = 0x23,                            /* MultiScan Band-3 (13" thru 21")        */
  565.     kESCSixStandard                = 0x2B,                            /* 13"/14" RGB or 12" Monochrome        */
  566.     kESCSevenPAL                = 0x00,                            /* PAL                                    */
  567.     kESCSevenNTSC                = 0x14,                            /* NTSC                                 */
  568.     kESCSevenVGA                = 0x17,                            /* VGA                                     */
  569.     kESCSeven16Inch                = 0x2D,                            /* 16" RGB (GoldFish)                      */
  570.     kESCSevenPALAlternate        = 0x30,                            /* PAL (Alternate)                         */
  571.     kESCSeven19Inch                = 0x3A,                            /* Third-Party 19"                        */
  572.     kESCSevenDDC                = 0x3E,                            /* DDC display                            */
  573.     kESCSevenNoDisplay            = 0x3F                            /* No display connected                 */
  574. };
  575.  
  576. /* DepthMode
  577.     This abstract data type is used to to reference RELATIVE pixel depths.
  578.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  579.  
  580.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  581.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  582.     hardware, 'kDepthMode1' may represent 8BPP.
  583.  
  584.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  585.     behave as expected.  The values of the constants which comprise the set are such
  586.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  587. */
  588. typedef unsigned short                     DepthMode;
  589. enum {
  590.     kDepthMode1                    = 128,
  591.     kDepthMode2                    = 129,
  592.     kDepthMode3                    = 130,
  593.     kDepthMode4                    = 131,
  594.     kDepthMode5                    = 132,
  595.     kDepthMode6                    = 133
  596. };
  597.  
  598. enum {
  599.     kFirstDepthMode                = 128,                            /* These constants are obsolete, and just included    */
  600.     kSecondDepthMode            = 129,                            /* for clients that have converted to the above        */
  601.     kThirdDepthMode                = 130,                            /* kDepthModeXXX constants.                            */
  602.     kFourthDepthMode            = 131,
  603.     kFifthDepthMode                = 132,
  604.     kSixthDepthMode                = 133
  605. };
  606.  
  607.  
  608.  
  609. struct VDPageInfo {
  610.     short                             csMode;                        /*(word) mode within device*/
  611.     long                             csData;                        /*(long) data supplied by driver*/
  612.     short                             csPage;                        /*(word) page to switch in*/
  613.     Ptr                             csBaseAddr;                    /*(long) base address of page*/
  614. };
  615. typedef struct VDPageInfo                VDPageInfo;
  616.  
  617. typedef VDPageInfo *                    VDPgInfoPtr;
  618.  
  619. struct VDSizeInfo {
  620.     short                             csHSize;                    /*(word) desired/returned h size*/
  621.     short                             csHPos;                        /*(word) desired/returned h position*/
  622.     short                             csVSize;                    /*(word) desired/returned v size*/
  623.     short                             csVPos;                        /*(word) desired/returned v position*/
  624. };
  625. typedef struct VDSizeInfo                VDSizeInfo;
  626.  
  627. typedef VDSizeInfo *                    VDSzInfoPtr;
  628.  
  629. struct VDSettings {
  630.     short                             csParamCnt;                    /*(word) number of params*/
  631.     short                             csBrightMax;                /*(word) max brightness*/
  632.     short                             csBrightDef;                /*(word) default brightness*/
  633.     short                             csBrightVal;                /*(word) current brightness*/
  634.     short                             csCntrstMax;                /*(word) max contrast*/
  635.     short                             csCntrstDef;                /*(word) default contrast*/
  636.     short                             csCntrstVal;                /*(word) current contrast*/
  637.     short                             csTintMax;                    /*(word) max tint*/
  638.     short                             csTintDef;                    /*(word) default tint*/
  639.     short                             csTintVal;                    /*(word) current tint*/
  640.     short                             csHueMax;                    /*(word) max hue*/
  641.     short                             csHueDef;                    /*(word) default hue*/
  642.     short                             csHueVal;                    /*(word) current hue*/
  643.     short                             csHorizDef;                    /*(word) default horizontal*/
  644.     short                             csHorizVal;                    /*(word) current horizontal*/
  645.     short                             csHorizMax;                    /*(word) max horizontal*/
  646.     short                             csVertDef;                    /*(word) default vertical*/
  647.     short                             csVertVal;                    /*(word) current vertical*/
  648.     short                             csVertMax;                    /*(word) max vertical*/
  649. };
  650. typedef struct VDSettings                VDSettings;
  651. typedef VDSettings *                    VDSettingsPtr;
  652.  
  653. struct VDDefMode {
  654.     UInt8                             csID;
  655.     SInt8                             filler;
  656. };
  657. typedef struct VDDefMode                VDDefMode;
  658. typedef VDDefMode *                        VDDefModePtr;
  659.  
  660. struct VDSyncInfoRec {
  661.     UInt8                             csMode;
  662.     UInt8                             csFlags;
  663. };
  664. typedef struct VDSyncInfoRec            VDSyncInfoRec;
  665.  
  666. typedef VDSyncInfoRec *                    VDSyncInfoPtr;
  667. typedef unsigned long                     DisplayModeID;
  668. typedef unsigned long                     VideoDeviceType;
  669. typedef unsigned long                     GammaTableID;
  670. /* Constants for the cscGetNextResolution call */
  671. enum {
  672.     kDisplayModeIDCurrent        = 0x00,                            /* Reference the Current DisplayModeID */
  673.     kDisplayModeIDInvalid        = (long)0xFFFFFFFF,                /* A bogus DisplayModeID in all cases */
  674.     kDisplayModeIDFindFirstResolution = (long)0xFFFFFFFE,        /* Used in cscGetNextResolution to reset iterator */
  675.     kDisplayModeIDNoMoreResolutions = (long)0xFFFFFFFD,            /* Used in cscGetNextResolution to indicate End Of List */
  676.     kDisplayModeIDFindFirstProgrammable = (long)0xFFFFFFFC        /* Used in cscGetNextResolution to find unused programmable timing */
  677. };
  678.  
  679. /* Constants for the GetGammaInfoList call */
  680. enum {
  681.     kGammaTableIDFindFirst        = (long)0xFFFFFFFE,                /* Get the first gamma table ID */
  682.     kGammaTableIDNoMoreTables    = (long)0xFFFFFFFD,                /* Used to indicate end of list */
  683.     kGammaTableIDSpecific        = 0x00                            /* Return the info for the given table id */
  684. };
  685.  
  686. /* Constants for GetMultiConnect call*/
  687. enum {
  688.     kGetConnectionCount            = (long)0xFFFFFFFF,                /* Used to get the number of possible connections in a "multi-headed" framebuffer environment.*/
  689.     kActivateConnection            = (0 << kConnectionInactive),    /* Used for activating a connection (csConnectFlags value).*/
  690.     kDeactivateConnection        = (1 << kConnectionInactive)    /* Used for deactivating a connection (csConnectFlags value.)*/
  691. };
  692.  
  693.  
  694. struct VDResolutionInfoRec {
  695.     DisplayModeID                     csPreviousDisplayModeID;    /* ID of the previous resolution in a chain */
  696.     DisplayModeID                     csDisplayModeID;            /* ID of the next resolution */
  697.     unsigned long                     csHorizontalPixels;            /* # of pixels in a horizontal line at the max depth */
  698.     unsigned long                     csVerticalLines;            /* # of lines in a screen at the max depth */
  699.     Fixed                             csRefreshRate;                /* Vertical Refresh Rate in Hz */
  700.     DepthMode                         csMaxDepthMode;                /* 0x80-based number representing max bit depth */
  701.     unsigned long                     csResolutionFlags;            /* Reserved - flag bits */
  702.     unsigned long                     csReserved;                    /* Reserved */
  703. };
  704. typedef struct VDResolutionInfoRec        VDResolutionInfoRec;
  705.  
  706. typedef VDResolutionInfoRec *            VDResolutionInfoPtr;
  707.  
  708. struct VDVideoParametersInfoRec {
  709.     DisplayModeID                     csDisplayModeID;            /* the ID of the resolution we want info on */
  710.     DepthMode                         csDepthMode;                /* The bit depth we want the info on (0x80 based) */
  711.     VPBlockPtr                         csVPBlockPtr;                /* Pointer to a video parameter block */
  712.     unsigned long                     csPageCount;                /* Number of pages supported by the resolution */
  713.     VideoDeviceType                 csDeviceType;                /* Device Type:  Direct, Fixed or CLUT; */
  714.     UInt32                             csDepthFlags;                /* Flags */
  715. };
  716. typedef struct VDVideoParametersInfoRec    VDVideoParametersInfoRec;
  717.  
  718. typedef VDVideoParametersInfoRec *        VDVideoParametersInfoPtr;
  719.  
  720. struct VDGammaInfoRec {
  721.     GammaTableID                     csLastGammaID;                /* the ID of the previous gamma table */
  722.     GammaTableID                     csNextGammaID;                /* the ID of the next gamma table */
  723.     Ptr                             csGammaPtr;                    /* Ptr to a gamma table data */
  724.     unsigned long                     csReserved;                    /* Reserved */
  725. };
  726. typedef struct VDGammaInfoRec            VDGammaInfoRec;
  727.  
  728. typedef VDGammaInfoRec *                VDGammaInfoPtr;
  729.  
  730. struct VDGetGammaListRec {
  731.     GammaTableID                     csPreviousGammaTableID;        /* ID of the previous gamma table */
  732.     GammaTableID                     csGammaTableID;                /* ID of the gamma table following csPreviousDisplayModeID */
  733.     unsigned long                     csGammaTableSize;            /* Size of the gamma table in bytes */
  734.     char *                            csGammaTableName;            /* Gamma table name (c-string) */
  735. };
  736. typedef struct VDGetGammaListRec        VDGetGammaListRec;
  737.  
  738. typedef VDGetGammaListRec *                VDGetGammaListPtr;
  739.  
  740. struct VDRetrieveGammaRec {
  741.     GammaTableID                     csGammaTableID;                /* ID of gamma table to retrieve */
  742.     GammaTbl *                        csGammaTablePtr;            /* Location to copy desired gamma to */
  743. };
  744. typedef struct VDRetrieveGammaRec        VDRetrieveGammaRec;
  745.  
  746. typedef VDRetrieveGammaRec *            VDRetrieveGammaPtr;
  747.  
  748. struct VDSetHardwareCursorRec {
  749.     void *                            csCursorRef;                /* reference to cursor data */
  750.     UInt32                             csReserved1;                /* reserved for future use */
  751.     UInt32                             csReserved2;                /* should be ignored */
  752. };
  753. typedef struct VDSetHardwareCursorRec    VDSetHardwareCursorRec;
  754.  
  755. typedef VDSetHardwareCursorRec *        VDSetHardwareCursorPtr;
  756.  
  757. struct VDDrawHardwareCursorRec {
  758.     SInt32                             csCursorX;                    /* x coordinate */
  759.     SInt32                             csCursorY;                    /* y coordinate */
  760.     UInt32                             csCursorVisible;            /* true if cursor is must be visible */
  761.     UInt32                             csReserved1;                /* reserved for future use */
  762.     UInt32                             csReserved2;                /* should be ignored */
  763. };
  764. typedef struct VDDrawHardwareCursorRec    VDDrawHardwareCursorRec;
  765.  
  766. typedef VDDrawHardwareCursorRec *        VDDrawHardwareCursorPtr;
  767.  
  768. struct VDSupportsHardwareCursorRec {
  769.     UInt32                             csSupportsHardwareCursor;
  770.                                                                 /* true if hardware cursor is supported */
  771.     UInt32                             csReserved1;                /* reserved for future use */
  772.     UInt32                             csReserved2;                /* must be zero */
  773. };
  774. typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec;
  775.  
  776. typedef VDSupportsHardwareCursorRec *    VDSupportsHardwareCursorPtr;
  777.  
  778. struct VDHardwareCursorDrawStateRec {
  779.     SInt32                             csCursorX;                    /* x coordinate */
  780.     SInt32                             csCursorY;                    /* y coordinate */
  781.     UInt32                             csCursorVisible;            /* true if cursor is visible */
  782.     UInt32                             csCursorSet;                /* true if cursor successfully set by last set control call */
  783.     UInt32                             csReserved1;                /* reserved for future use */
  784.     UInt32                             csReserved2;                /* must be zero */
  785. };
  786. typedef struct VDHardwareCursorDrawStateRec VDHardwareCursorDrawStateRec;
  787.  
  788. typedef VDHardwareCursorDrawStateRec *    VDHardwareCursorDrawStatePtr;
  789.  
  790. struct VDConvolutionInfoRec {
  791.     DisplayModeID                     csDisplayModeID;            /* the ID of the resolution we want info on */
  792.     DepthMode                         csDepthMode;                /* The bit depth we want the info on (0x80 based) */
  793.     unsigned long                     csPage;
  794.     UInt32                             csFlags;
  795.     UInt32                             csReserved;
  796. };
  797. typedef struct VDConvolutionInfoRec        VDConvolutionInfoRec;
  798.  
  799. typedef VDConvolutionInfoRec *            VDConvolutionInfoPtr;
  800.  
  801. struct VDPowerStateRec {
  802.     unsigned long                     powerState;
  803.     unsigned long                     powerFlags;
  804.  
  805.     unsigned long                     powerReserved1;
  806.     unsigned long                     powerReserved2;
  807. };
  808. typedef struct VDPowerStateRec            VDPowerStateRec;
  809.  
  810. typedef VDPowerStateRec *                VDPowerStatePtr;
  811. /*
  812.     Private Data to video drivers.
  813.     
  814.     In versions of MacOS with multiple address spaces (System 8), the OS 
  815.     must know the extent of parameters in order to move them between the caller
  816.     and driver.  The old private-selector model for video drivers does not have
  817.     this information so:
  818.     
  819.     For post-7.x Systems private calls should be implemented using the cscPrivateCall
  820. */
  821.  
  822. struct VDPrivateSelectorDataRec {
  823.     LogicalAddress                     privateParameters;            /* Caller's parameters*/
  824.     ByteCount                         privateParametersSize;        /* Size of data sent from caller to driver*/
  825.     LogicalAddress                     privateResults;                /* Caller's return area. Can be nil, or same as privateParameters.*/
  826.     ByteCount                         privateResultsSize;            /* Size of data driver returns to caller. Can be nil, or same as privateParametersSize.*/
  827. };
  828. typedef struct VDPrivateSelectorDataRec    VDPrivateSelectorDataRec;
  829.  
  830.  
  831. struct VDPrivateSelectorRec {
  832.     UInt32                             reserved;                    /* Reserved (set to 0). */
  833.     VDPrivateSelectorDataRec         data[1];
  834. };
  835. typedef struct VDPrivateSelectorRec        VDPrivateSelectorRec;
  836.  
  837. struct VDDDCBlockRec {
  838.     UInt32                             ddcBlockNumber;                /* Input -- DDC EDID (Extended Display Identification Data) number (1-based) */
  839.     ResType                         ddcBlockType;                /* Input -- DDC block type (EDID/VDIF) */
  840.     UInt32                             ddcFlags;                    /* Input -- DDC Flags*/
  841.     UInt32                             ddcReserved;                /* Reserved */
  842.     Byte                             ddcBlockData[128];            /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */
  843. };
  844. typedef struct VDDDCBlockRec            VDDDCBlockRec;
  845.  
  846. typedef VDDDCBlockRec *                    VDDDCBlockPtr;
  847.  
  848. enum {
  849.                                                                 /* timingSyncConfiguration*/
  850.     kSyncInterlaceMask            = (1 << 7),
  851.     kSyncAnalogCompositeMask    = 0,
  852.     kSyncAnalogCompositeSerrateMask = (1 << 2),
  853.     kSyncAnalogCompositeRGBSyncMask = (1 << 1),
  854.     kSyncAnalogBipolarMask        = (1 << 3),
  855.     kSyncAnalogBipolarSerrateMask = (1 << 2),
  856.     kSyncAnalogBipolarSRGBSyncMask = (1 << 1),
  857.     kSyncDigitalCompositeMask    = (1 << 4),
  858.     kSyncDigitalCompositeSerrateMask = (1 << 2),
  859.     kSyncDigitalCompositeMatchHSyncMask = (1 << 2),
  860.     kSyncDigitalSeperateMask    = (1 << 4) + (1 << 3),
  861.     kSyncDigitalVSyncPositiveMask = (1 << 2),
  862.     kSyncDigitalHSyncPositiveMask = (1 << 1)
  863. };
  864.  
  865.  
  866.  
  867.  
  868. struct VDDisplayTimingRangeRec {
  869.     UInt32                             csRangeSize;                /* Init to sizeof(VDDisplayTimingRangeRec)*/
  870.     UInt32                             csRangeType;                /* Init to 0*/
  871.     UInt32                             csRangeVersion;                /* Init to 0*/
  872.     UInt32                             csRangeReserved;            /* Init to 0*/
  873.  
  874.     UInt32                             csRangeBlockIndex;            /* Requested block*/
  875.     UInt32                             csRangeGroup;                /* set to 0*/
  876.     UInt32                             csRangeBlockCount;            /* # blocks*/
  877.     UInt32                             csRangeFlags;                /* dependent video*/
  878.  
  879.     UInt64                             csMinPixelClock;            /* Min dot clock in Hz*/
  880.     UInt64                             csMaxPixelClock;            /* Max dot clock in Hz*/
  881.  
  882.     UInt32                             csMaxPixelError;            /* Max dot clock error*/
  883.     UInt32                             csTimingRangeSyncFlags;
  884.     UInt32                             csTimingRangeSignalLevels;
  885.  
  886.     UInt32                             csMinFrameRate;                /* Hz*/
  887.     UInt32                             csMaxFrameRate;                /* Hz*/
  888.     UInt32                             csMinLineRate;                /* Hz*/
  889.     UInt32                             csMaxLineRate;                /* Hz*/
  890.  
  891.  
  892.     UInt32                             csReserved1;                /* Init to 0*/
  893.     UInt32                             csReserved2;                /* Init to 0*/
  894.     UInt32                             csReserved3;                /* Init to 0*/
  895.     UInt32                             csReserved4;                /* Init to 0*/
  896.  
  897.     UInt32                             csReserved5;                /* Init to 0*/
  898.     UInt32                             csReserved6;                /* Init to 0*/
  899.     UInt32                             csReserved7;                /* Init to 0*/
  900.     UInt32                             csReserved8;                /* Init to 0*/
  901. };
  902. typedef struct VDDisplayTimingRangeRec    VDDisplayTimingRangeRec;
  903.  
  904. typedef VDDisplayTimingRangeRec *        VDDisplayTimingRangePtr;
  905.  
  906. enum {
  907.                                                                 /* csDisplayModeState*/
  908.     kDMSModeReady                = 0,                            /* Display Mode ID is configured and ready*/
  909.     kDMSModeNotReady            = 1,                            /* Display Mode ID is is being programmed*/
  910.     kDMSModeFree                = 2                                /* Display Mode ID is not associated with a timing*/
  911. };
  912.  
  913.  
  914.  
  915. struct VDDetailedTimingRec {
  916.     UInt32                             csTimingSize;                /* Init to sizeof(VDDetailedTimingRec)*/
  917.     UInt32                             csTimingType;                /* Init to 0*/
  918.     UInt32                             csTimingVersion;            /* Init to 0*/
  919.     UInt32                             csTimingReserved;            /* Init to 0*/
  920.  
  921.     DisplayModeID                     csDisplayModeID;            /* Init to 0*/
  922.     UInt32                             csDisplayModeSeed;            /* */
  923.     UInt32                             csDisplayModeState;            /* Display Mode state*/
  924.     UInt32                             csDisplayModeReserved;
  925.  
  926.     UInt32                             csSignalConfig;
  927.     UInt32                             csSignalLevels;
  928.  
  929.     UInt64                             csPixelClock;                /* Hz*/
  930.  
  931.     UInt64                             csMinPixelClock;            /* Hz - With error what is slowest actual clock */
  932.     UInt64                             csMaxPixelClock;            /* Hz - With error what is fasted actual clock */
  933.  
  934.  
  935.     UInt32                             csHorizontalActive;            /* Pixels*/
  936.     UInt32                             csHorizontalBlanking;        /* Pixels*/
  937.     UInt32                             csHorizontalSyncOffset;        /* Pixels*/
  938.     UInt32                             csHorizontalSyncPulseWidth;    /* Pixels*/
  939.  
  940.     UInt32                             csVerticalActive;            /* Lines*/
  941.     UInt32                             csVerticalBlanking;            /* Lines*/
  942.     UInt32                             csVerticalSyncOffset;        /* Lines*/
  943.     UInt32                             csVerticalSyncPulseWidth;    /* Lines*/
  944.  
  945.     UInt32                             csHorizontalBorderLeft;        /* Pixels*/
  946.     UInt32                             csHorizontalBorderRight;    /* Pixels*/
  947.     UInt32                             csVerticalBorderTop;        /* Lines*/
  948.     UInt32                             csVerticalBorderBottom;        /* Lines*/
  949.  
  950.     UInt32                             csHorizontalSyncConfig;
  951.     UInt32                             csHorizontalSyncLevel;
  952.     UInt32                             csVerticalSyncConfig;
  953.     UInt32                             csVerticalSyncLevel;
  954.  
  955.     UInt32                             csReserved1;                /* Init to 0*/
  956.     UInt32                             csReserved2;                /* Init to 0*/
  957.     UInt32                             csReserved3;                /* Init to 0*/
  958.     UInt32                             csReserved4;                /* Init to 0*/
  959.  
  960.     UInt32                             csReserved5;                /* Init to 0*/
  961.     UInt32                             csReserved6;                /* Init to 0*/
  962.     UInt32                             csReserved7;                /* Init to 0*/
  963.     UInt32                             csReserved8;                /* Init to 0*/
  964. };
  965. typedef struct VDDetailedTimingRec        VDDetailedTimingRec;
  966.  
  967. typedef VDDetailedTimingRec *            VDDetailedTimingPtr;
  968. typedef UInt32                             VDClutBehavior;
  969. typedef VDClutBehavior *                VDClutBehaviorPtr;
  970. enum {
  971.     kSetClutAtSetEntries        = 0,                            /* SetEntries behavior is to update clut during SetEntries call*/
  972.     kSetClutAtVBL                = 1                                /* SetEntries behavior is to upate clut at next vbl*/
  973. };
  974.  
  975.  
  976.  
  977. #if PRAGMA_STRUCT_ALIGN
  978.     #pragma options align=reset
  979. #elif PRAGMA_STRUCT_PACKPUSH
  980.     #pragma pack(pop)
  981. #elif PRAGMA_STRUCT_PACK
  982.     #pragma pack()
  983. #endif
  984.  
  985. #ifdef PRAGMA_IMPORT_OFF
  986. #pragma import off
  987. #elif PRAGMA_IMPORT
  988. #pragma import reset
  989. #endif
  990.  
  991. #ifdef __cplusplus
  992. }
  993. #endif
  994.  
  995. #endif /* __VIDEO__ */
  996.  
  997.